package com.bupt.service.common;

import com.bupt.annotation.MParam;
import com.bupt.dto.sys.LoginUserDto;
import com.bupt.exception.BaseException;

import javax.servlet.http.HttpServletResponse;
import java.util.List;
import java.util.Map;

public interface KangHuiService {
    //组合断，一起一次断
    Object getBreak(@MParam("当前的登陆的用户") LoginUserDto loginUserDto, @MParam("项目的ID") String pId,
                    @MParam("组合断开的fiberId集合") List<String> fiberLinkIds,
                    @MParam("组合断开的节点集合") List<String> nodeIds) throws BaseException;

    //导入链路和节点的组合，依次单断，最终统计
    Object getBreakOneByOne(@MParam("当前的登陆的用户") LoginUserDto loginUserDto,
                            @MParam("项目的ID") String pId, @MParam("组合断开的fiberId集合") List<String> fiberLinkIds,
                            @MParam("组合断开的节点集合") List<String> nodeIds) throws BaseException;

    //组合断数据导出
    HttpServletResponse zuheExport(HttpServletResponse response, @MParam("当前的登陆的用户") LoginUserDto loginUserDto,
                                   @MParam("项目的ID") String pId) throws Exception;

    //依次单断数据导出
    HttpServletResponse oneByOneExport(HttpServletResponse response, @MParam("当前的登陆的用户") LoginUserDto loginUserDto,
                                       @MParam("项目的ID") String pId) throws Exception;

    // 读取业务恢复率
    Map<String, Double> getBreakRate(@MParam("当前的登陆的用户") LoginUserDto loginUserDto,
                                     @MParam("项目的ID") String pId) throws BaseException;
    Object getBreakPort(@MParam("当前的登陆的用户") LoginUserDto loginUserDto,
                        @MParam("项目的ID") String pId,
                        @MParam("节点id") String nodeId,
                        @MParam("单断的端口id组合") List<Integer> nodeIds) throws BaseException;
}
